﻿function addFirefox2style()
{
   document.write("<link href=\"stylus/safari.css\" rel=\"stylesheet\" type=\"text/css\" />");                
}

function addGoogleCstyle()
{
    document.write("<link href=\"stylus/google.css\" rel=\"stylesheet\" type=\"text/css\" />");     
}

function clearfield(fieldid)
{
	if (document.getElementById(fieldid).value==document.getElementById(fieldid).defaultValue)
	{
	document.getElementById(fieldid).value=""
	}
}


function unclearfield(fieldid,email)
{
	if (email)
	{
		if (document.getElementById(fieldid).value==""||document.getElementById(fieldid).value==document.getElementById(fieldid).defaultValue)
		{
		document.getElementById(fieldid).value=document.getElementById(fieldid).defaultValue
		}
		else
		{
		emailCheck(document.getElementById(fieldid).value)
		}
	}
	else
	{
		if (document.getElementById(fieldid).value=="")
		{
		document.getElementById(fieldid).value=document.getElementById(fieldid).defaultValue
		}
	}
}
function ToggleClass(id, class1, class2) {
    try {
        if (document.getElementById(id).className == class1) {
            document.getElementById(id).className = class2;
        }
        else {
            document.getElementById(id).className = class1;
        }
    }
    catch (e) {
        window.alert(e.description);
    }
}